package com.mxpio.erp.common.workshop.service;

import java.util.List;

import com.mxpio.erp.common.jpa.model.Order;
import com.mxpio.erp.common.plan.entity.ManufacturePlan;
import com.mxpio.erp.common.workshop.entity.ManufactureOrder;
import com.mxpio.erp.common.workshop.entity.MaterialKittingAnalysisHistory;
import com.mxpio.erp.common.workshop.vo.MaterialFeedingDetailVO;
import com.mxpio.erp.common.workshop.vo.MoCostAccountingVO;
import com.mxpio.erp.common.workshop.vo.MoStortageAnalysisVO;
import com.mxpioframework.common.vo.Result;
import com.mxpioframework.jpa.query.Criteria;
import com.mxpioframework.system.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;

public interface ManufactureOrderService extends BaseService<ManufactureOrder> {

	/**
	 * 计算订单完工数量
	 * @param content
	 * @param string 
	 */
	void handleManufactureOrderQuantity(List<ManufactureOrder> content, String accessType);

    @Transactional
    Result<Object> convertMOFromMPlan(List<ManufacturePlan> planList);

    Result<MaterialKittingAnalysisHistory> materialKittingAnalysis();

	Result<List<MoStortageAnalysisVO>> shortageAnalysis(Criteria criteria);

	Result<List<MaterialFeedingDetailVO>> materialFeedingAnalysis(String itemCode);

    Result<Page<MoCostAccountingVO>> costAccounting(Criteria criteria, Integer pageSize, Integer pageNo) throws IllegalAccessException;

    Result<? extends Order> clearOrder(String bizNo);
}
